<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>练习题四</title>
</head>

<body>
    <script>
        function bank() {
            let Balance = +prompt('请输入余额')
            let LiveConumption = +prompt('请输入生活消费')
            let FoodConumption = +prompt('请输入食宿消费')
            Balance = Balance - LiveConumption - FoodConumption
            return Balance
        }
        document.write('银行卡余额为：' + bank())
    </script>
</body>

</html>